import { action, makeAutoObservable } from "mobx";

class RootStore {
    // es7的装饰语法 Object.definProperty
    name = '悟空';
    constructor() {
        makeAutoObservable(this)
    }

    // 修改name
    @action
    changeName(name) {
        this.name = name
    }
}

export default new RootStore();